﻿using Sample.JwtBearer.Api.Requests;

namespace Sample.JwtBearer.Api.Services;

/// <summary>
/// 用户服务接口规范定义
/// </summary>
public interface IUserService
{
    /// <summary>
    /// 注册用户
    /// </summary>
    /// <param name="register"></param>
    /// <returns></returns>
    Task<TokenResult> RegisterAsync(RegisterRequest register);
    //Task<TokenResult> RegisterAsync(string username, string password, string address);

    /// <summary>
    /// 登录
    /// </summary>
    /// <param name="login"></param>
    /// <returns></returns>
    Task<TokenResult> LoginAsync(LoginRequest login);
    //Task<TokenResult> LoginAsync(string username, string password);

    /// <summary>
    /// 刷新token
    /// </summary>
    /// <param name="refreshToken"></param>
    /// <returns></returns>
    Task<TokenResult> RefreshTokenAsync(RefreshTokenRequest refreshToken);
    //Task<TokenResult> RefreshTokenAsync(string token, string refreshToken);
}